// This file is required by the index.html file and will
// be executed in the renderer process for that window.
// All of the Node.js APIs are available in this process.
// window.location.href="http://10.11.3.18"


const { remote, ipcRenderer } = require('electron')
const { FindInPage } = require('./src/index.js')
// const $$ = require('jquery')


// $$("div").load("http://10.11.3.5");
// window.open("http://10.11.3.18")
// window.location.href="http://10.11.3.5";
let findInPage = new FindInPage(remote.getCurrentWebContents(), {
    preload: true,
    offsetTop: 6,
    offsetRight: 10
})

// let findInPage = new FindInPage(remote.getCurrentWebContents(), {
//   boxBgColor: '#333',
//   boxShadowColor: '#000',
//   inputColor: '#aaa',
//   inputBgColor: '#222',
//   inputFocusColor: '#555',
//   textColor: '#aaa',
//   textHoverBgColor: '#555',
//   caseSelectedColor: '#555',
//   offsetTop: 8,
//   offsetRight: 12
// })

ipcRenderer.on('on-find', (e, args) => {
    findInPage.openFindWindow()
})

window.onbeforeunload = (e) => {

    return '确认关闭'
}